<?php
include "conn.php";
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Method:POST,GET');

$result = $conn->query("select * from yiguolist");
$yiguolist = array();
for ($i = 0; $i < $result->num_rows; $i++) {
    $yiguolist[$i] = $result->fetch_assoc();
}

$result = $conn->query("select * from yiguobanner");
$yiguobanner = array();
for ($i = 0; $i < $result->num_rows; $i++) {
    $yiguobanner[$i] = $result->fetch_assoc();
}
$ygdata=array($yiguobanner,$yiguolist);
echo  json_encode($ygdata);
